Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for X509_get0_pubkey #1000

Merged
merged 1 commit into from
May 10, 2023
Merged

Conversation

samuel40791765
Copy link
Contributor

Issues:

Resolves CryptoAlg-1725

Description of changes:

mySQL consumes the X509_get0_pubkey API when building with OpenSSL1.1.1/AWS-LC, and uses the X509_get_pubkey when built with OpenSSL1.0.2. X509_get0_pubkey seems to have been added in OpenSSL1.1.1 and is very similar to X509_get_pubkey (which exists in AWS-LC).

X509_get_pubkey attempts to decode the public key for certificate x. If successful it returns the public key as an EVP_PKEY pointer with its reference count incremented: this means the returned key must be freed up after use. X509_get0_pubkey is similar except it does not increment the reference count of the returned EVP_PKEY so it must not be freed up after use.

Call-outs:

N/A

Testing:

N/A

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@samuel40791765 samuel40791765 force-pushed the x509-pubkey branch 2 times, most recently from 987269a to 8aca04c Compare May 8, 2023 23:05
@samuel40791765 samuel40791765 marked this pull request as ready for review May 8, 2023 23:05
skmcgrail
skmcgrail previously approved these changes May 8, 2023
@samuel40791765 samuel40791765 requested a review from andrewhop May 9, 2023 17:38
andrewhop
andrewhop previously approved these changes May 9, 2023
@samuel40791765 samuel40791765 dismissed stale reviews from andrewhop and skmcgrail via 3d9fdb8 May 9, 2023 23:17
@samuel40791765 samuel40791765 force-pushed the x509-pubkey branch 2 times, most recently from 3d9fdb8 to bfe46bd Compare May 9, 2023 23:18
@samuel40791765 samuel40791765 enabled auto-merge (squash) May 10, 2023 00:16
@samuel40791765 samuel40791765 merged commit be1de13 into aws:main May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants